Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Convert OpenSlide-Java Makefile to Autotools #14

Merged
merged 11 commits into from
Nov 1, 2011
Merged

[RFC] Convert OpenSlide-Java Makefile to Autotools #14

merged 11 commits into from
Nov 1, 2011

Conversation

bgilbert
Copy link
Member

I wanted to improve the Makefile to automatically detect include directories and compiler flags, but it became apparent that I was reimplementing Autoconf. So, here is a conversion of OpenSlide-Java to Autotools. Makefile.am is responsible for make dist (which we haven't had before) and for building the JNI, and still calls out to Ant for building the jar. All of the stuff from mingw32-cheatsheet.txt is handled automatically if --host is passed to configure. Tested on Linux and with mingw32 cross-compiles.

TODO:

  1. Test native builds with MinGW on Windows. Aside from MSYS /etc/fstab issues, this should (?) be straightforward.
  2. Move the jar into $datadir and the .so into $libdir to make it easier to follow the Debian Java policy.
  3. Embed the JNI library path into the jar via a properties file, so that (except on Windows) we can call System.load() without requiring the LD_LIBRARY_PATH to be set.

The JNI code stores a pointer inside a jlong, causing warnings on 32-bit
systems.  Silence these.
Fixes autoreconf failure.
On Linux, the JNI library will likely not be in the library search path.
Load it by its full path in this case.
If --host is passed to configure but --build is not, configure will guess
whether we are cross-compiling based on whether it can run a compiled
executable.  If the build system is configured to run Windows executables
via Wine, this test can fail.
@bgilbert
Copy link
Member Author

I have decided against point 2. Debian policy also requires the JAR filename to include the package version and an unversioned symlink to be created, which doesn't make sense for us upstream. While the packaging scripts are doing this, they can move the JAR to the desired directory.

@bgilbert
Copy link
Member Author

I think that's the last of it.

Without objection, I will merge this soon.

bgilbert added a commit that referenced this pull request Nov 1, 2011
Convert OpenSlide-Java Makefile to Autotools
@bgilbert bgilbert merged commit 00c66d0 into openslide:master Nov 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant